package com.zl.customer.pojo;

import lombok.Data;

import java.util.List;

/**
 * 分页实体类
 * @ClassName: Page
 * @author: suke
 * @since: 2021/7/14 14:09
 */
@Data
public class Page<T>{
    private List<T> datas; //当前页记录
    private int pageIndex;//当前页
    private int pageSize; //页容量
    private long count;//总记录数
    //private long totalPages;//总页数



    public long getTotalPages() {
        return  this.count % this.pageSize == 0
                 ? this.count / this.pageSize : this.count / this.pageSize+1;
    }
}
